import { toPara } from "@/utils/base";
import moment from "@/utils/moment"

export const docType: string = "DyVideo";

export class DyVideoDataClass {

  video_id: string = "";

  /**
   * 标题
   */
  title: string = "";

  /**
   * 图片
   */
  cover: string = "";

  /**
   * 视频播放地址
   */
  share_url: string = "";

  /**
   * 创建时间 毫秒值
   */
  create_time: number = 0;

  /**
   * 创建时间
   */
  get _create_time() {
    return moment(this.create_time*1000).format("YYYY-MM-DD HH:mm");
  }

  constructor(para: any) {
    toPara(this, para)
  }
}